<?php

namespace App\Modules\Admin\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class AdminRole
 * *
 * @property $role_uid  角色ID
 * @property $name  角色名称
 * @property $code  角色标识
 * @property $description  描述
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
 *
 * @package  App\Modules\Admin\Models
 * @mixin \Illuminate\Database\Eloquent\Builder
 */
class AdminRole extends Model
{
    use SoftDeletes;

    protected $table = 'admin_roles';

    protected $fillable = ['role_uid', 'name', 'code', 'description'];

    public function roleMenu(){
        return $this->hasMany(AdminMenuRole::class, 'role_uid', 'role_uid');
    }
}
